# 调用高德天气查询api
import requests

def weather(city):
    url = 'https://restapi.amap.com/v3/weather/weatherInfo?parameters'
    params = {
        'key': '填入你的key',
        'city': city,
    }
    response = requests.get(url,params)
    results = response.json()
    return results

